const fs = require('fs')

const rs = fs.createReadStream('./w1.jpg')
const ws = fs.createWriteStream('./w2.jpg')
rs.pipe(ws)